package cn.lintcode.console;

import java.io.*;
import java.util.ArrayList;
import java.util.Collections;

/**
 * @author labvi
 * @version 1.0.0
 */
public class Main {
    static StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
    /*static StreamTokenizer in;

    static {
        try {
            in = new StreamTokenizer(new BufferedReader(new InputStreamReader(new FileInputStream("D:\\project\\java_web\\algorithm\\1.in"))));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }*/

    static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
    static int nextInt() throws IOException {
        in.nextToken();
        return (int) in.nval;
    }

    static double nextDouble() throws IOException {
        in.nextToken();
        return in.nval;
    }

    static long nextLong() throws IOException {
        in.nextToken();
        return (long) in.nval;
    }

    static String next() throws IOException {
        in.nextToken();
        return in.sval;
    }



    public static void main(String[] args) throws IOException {
        long l = System.currentTimeMillis();
        ArrayList<Integer> list = new ArrayList<>();
        while (true) {
            int i = nextInt();
            if (i== -1) {
                break;
            }
            list.add(i);
        }
        Collections.sort(list);
        StringBuilder stringBuilder = new StringBuilder();
        list.stream().forEach(integer -> stringBuilder.append(integer+"\n"));
        out.printf(stringBuilder.toString());
        out.flush();  //加这行代码，输出才会显示
        System.out.println(System.currentTimeMillis() - l);
    }
}
